@import '../../../@theme/styles/themes.scss';

@mixin tableStyle {
  background: nb-theme(table-tr-even-color);
  color: nb-theme(card-text-color);
  border: 1px solid nb-theme(table-outline-color);
  border-width: 0 0 1px 0;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
:host ::ng-deep .p-datatable .p-sortable-column .p-sortable-column-icon {
  vertical-align: baseline;
  margin-left: 0;
}

tr > th:not(.bg):hover {
  background: nb-theme(card-background-color);
}

:host ::ng-deep .p-datatable .p-datatable-header {
  @include tableStyle();
}

:host ::ng-deep .p-datatable .p-datatable-thead > tr > th {
  @include tableStyle();
}

:host ::ng-deep .p-datatable.p-datatable-hoverable-rows .p-datatable-tbody > tr:not(.p-highlight):hover {
  background: nb-theme(table-tr-even-color);
  color: nb-theme(card-text-color);
}

:host ::ng-deep .p-datatable .p-datatable-tbody > tr {
  background: nb-theme(card-background-color);
  color: nb-theme(card-text-color);
}
:host ::ng-deep .p-datatable .p-datatable-tbody > tr > td {
  border: 1px solid nb-theme(table-outline-color);
  border-width: 0 0 1px 0;
}

:host ::ng-deep .p-datatable .p-sortable-column.p-highlight,
:host ::ng-deep .p-datatable .p-sortable-column.p-highlight:hover,
:host ::ng-deep .p-datatable .p-sortable-column:not(.p-highlight):hover,
:host ::ng-deep .p-datatable .p-sortable-column.p-highlight .p-sortable-column-icon {
  color: nb-theme(color-primary-default) !important;
}

// 复选框主题颜色
:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight {
  border-color: nb-theme(color-primary-hover);
  background: nb-theme(color-primary-hover);
  &:hover {
    border-color: nb-theme(color-primary-default);
    background: nb-theme(color-primary-default);
  }
}

// 底部导航
:host ::ng-deep .p-paginator {
  background: nb-theme(card-background-color);
  color: nb-theme(card-text-color);
  border: 1px solid nb-theme(table-outline-color);
  border-width: 0 0 1px 0;
}
